import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import loginpt from '@/components/loginpt'
import testplanform from '@/components/testplanform'
import uploadapifile from '@/components/uploadapifile'
import Home from '@/components/Home'
import apicase from '@/components/apicase'
import dataset from '@/components/dataset'
import caseplay from '@/components/caseplay'
import apitestreport from '@/components/apitestreport'
import uploadneedfile from '@/components/uploadneedfile'
import configuration from '@/components/configuration'
import usermanagement from '@/components/usermanagement'
import testingplan from '@/components/testingplan'
import register from '@/components/register'
import forgotpassword from '@/components/forgotpassword'
import functioncase from '@/components/functioncase'
import ecuprocess from '@/components/ecuprocess'
import taskcenter from '@/components/taskcenter'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/HelloWorld',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/forgotpassword',
      name: 'forgotpassword',
      component: forgotpassword
    },
    {
      path: '/register',
      name: 'register',
      component: register
    },
    {
      path: '/',
      name: 'loginpt',
      component: loginpt
    },
    {
      path: '/testplanform',
      name: 'testplanform',
      component: testplanform,
      meta: {
        title: '测试平台'
      },
      children: [
        {
          path: '',
          redirect: 'home'
        },
        {
          path: 'home',
          name: 'home',
          component: Home
        },
        {
          path: '/uploadapifile',
          name: 'uploadapifile',
          component: uploadapifile
        },
        {
          path: '/apicase',
          name: 'apicase',
          component: apicase
        },
        {
          path: '/dataset',
          name: 'dataset',
          component: dataset
        },
        {
          path: '/caseplay',
          name: 'caseplay',
          component: caseplay
        },
        {
          path: '/apitestreport',
          name: 'apitestreport',
          component: apitestreport
        },
        {
          path: '/uploadneedfile',
          name: 'uploadneedfile',
          component: uploadneedfile
        },
        {
          path: '/configuration',
          name: 'configuration',
          component: configuration
        },
        {
          path: '/usermanagement',
          name: 'usermanagement',
          component: usermanagement
        },
        {
          path: '/testingplan',
          name: 'testingplan',
          component: testingplan
        },
        {
          path: '/functioncase',
          name: 'functioncase',
          component: functioncase
        },
        {
          path: '/ecuprocess',
          name: 'ecuprocess',
          component: ecuprocess
        }
      ]
    }
  ]
})
